<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" import="com.brother.realtime.*,com.brother.model.*,java.util.*,com.brother.service.TrackerService"%><%
 com.brother.model.Customer user = (com.brother.model.Customer)session.getAttribute(com.brother.Constants.LOGIN_SESSTION_NAME);
 if(user == null || user.getUserid() == 0){
	 out.write(0 + "\r\n");
	 out.write(0);
	 return;
 }
 ProcessorPool p = ProcessorPool.getInstance();
 List<RealTimeDataProcessor> rps= p.getAll();
 
 String userName = request.getParameter("userName");
 String trackerName = request.getParameter("trackerName");
 String trackerIME = request.getParameter("trackerIME");
 TrackerService service =new TrackerService();
 List<Tracker> trackers = service.findChildrenTracker(user.getUserid(), userName, trackerName, trackerIME);
 

 int count = 0;

  for(RealTimeDataProcessor pro : rps){
    for(Tracker o : trackers){
        if(pro.getUserTrackerId() == null){
          continue;
        }
        if(pro.getUserTrackerId().equals(o.getUserTrackerId())){
          count++;
        }
    }
  }
 
  out.write(count + "-" +(trackers.size() - count));
 
 com.brother.database.DataBase.closeThreadConnection();
 %>